package com.niodata.dp.core.exception;

/**
 * dp base exception,all exception should extend it.
 */
public abstract class DpException extends RuntimeException {

  protected String errorMessage;

  public DpException(String message, Throwable cause) {
    super(message, cause);
    this.errorMessage = message;
  }

  public DpException(String message) {
    super(message);
    this.errorMessage = message;
  }

  public abstract int errorCode();

  public String errorMessage() {
    return this.errorMessage;
  }
}
